import Vue from 'vue'
import Router from 'vue-router'
import Login from './views/login'
import Layout from './components/layout.vue'
import Home from './views/home'
import House from './views/house'
Vue.use(Router)

export default new Router({
    routes:[
        {
            path:'/login',
            name:'login',
            component:Login,
        },
        {
            path:'/',
            redirect:'/login'
        },
        {
            path:'/layout',
            name:'layout',
            component:Layout,
            redirect:'/home',
            children:[
                {
                    path:'/home',
                    component:Home,
                    meta:{title:'首页'}
                }
            ]

        },
        {
            path:'/house',
            component:Layout,
            children:[
                {
                    path:'/',
                    component:House,
                    meta:{title:'房源信息管理'}
                }
            ]
            
        },

    ]
})